<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="utf-8">
  
  <title>Linux命令 - sed | gdme1320 的笔记</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="Table of Contents   一般用法： Snippets  Find and append to end of line   命令行选项  –version –help   SCRIPT  Address （Script格式的[addr]部分）  数字 正则 范围 反向操作：&apos;!&apos;   Command （Script格式的X部分）  a c d i p s         一般用">
<meta property="og:type" content="article">
<meta property="og:title" content="Linux命令 - sed">
<meta property="og:url" content="http://gdme1320.gitee.com/linux/sed/index.html">
<meta property="og:site_name" content="gdme1320 的笔记">
<meta property="og:description" content="Table of Contents   一般用法： Snippets  Find and append to end of line   命令行选项  –version –help   SCRIPT  Address （Script格式的[addr]部分）  数字 正则 范围 反向操作：&apos;!&apos;   Command （Script格式的X部分）  a c d i p s         一般用">
<meta property="og:locale" content="default">
<meta property="og:updated_time" content="2022-03-23T09:59:24.852Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Linux命令 - sed">
<meta name="twitter:description" content="Table of Contents   一般用法： Snippets  Find and append to end of line   命令行选项  –version –help   SCRIPT  Address （Script格式的[addr]部分）  数字 正则 范围 反向操作：&apos;!&apos;   Command （Script格式的X部分）  a c d i p s         一般用">
  
    <link rel="alternate" href="/atom.xml" title="gdme1320 的笔记" type="application/atom+xml">
  
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" integrity="sha384-XdYbMnZ/QjLh6iI4ogqCTaIjrFk87ip+ekIjefZch0Y+PvJ8CDYtEs1ipDmPorQ+" crossorigin="anonymous">

  <link rel="stylesheet" href="/css/styles.css">
  <link rel="stylesheet" href="/css/docs.min.css">
  

</head>
</html>
<body>
  <nav class="navbar navbar-inverse">
  <div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-menu-navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="main-menu-navbar">
      <ul class="nav navbar-nav">
        
          <li><a class href="/index.html">Home</a></li>
        
          <li><a class href="/archives/">Archives</a></li>
        
      </ul>

      <!--
      <ul class="nav navbar-nav navbar-right">
        
          <li><a href="/atom.xml" title="RSS Feed"><i class="fa fa-rss"></i></a></li>
        
      </ul>
      -->
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>

  <div class="container bs-docs-container">
  
    <div class="row">
        <div class="col-sm-8 blog-main">
          <article id="post-linux/sed" class="article article-type-post" itemscope itemprop="blogPost">

  <header class="article-header">
    
  
    <h1 class="article-title" itemprop="name">
      Linux命令 - sed
    </h1>
  


  </header>

  <div class="article-meta">
    <div class="article-datetime">
  <a href="/linux/sed/" class="article-date"><time datetime="2022-03-23T09:59:24.848Z" itemprop="datePublished">2022-03-23</time></a>
</div>

    
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/linux/">linux</a>
  </div>


  </div>
  <div class="article-inner">

    <div class="article-entry" itemprop="articleBody">
      
        
<div id="content">
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org2d23f93">一般用法：</a></li>
<li><a href="#orge22c914">Snippets</a>
<ul>
<li><a href="#org2e877e1">Find and append to end of line</a></li>
</ul>
</li>
<li><a href="#orgad369d0">命令行选项</a>
<ul>
<li><a href="#org69209dd">–version</a></li>
<li><a href="#orgaa27efc">–help</a></li>
</ul>
</li>
<li><a href="#org23be860">SCRIPT</a>
<ul>
<li><a href="#org64d41b0">Address （Script格式的[addr]部分）</a>
<ul>
<li><a href="#orga36d0f1">数字</a></li>
<li><a href="#orge97a544">正则</a></li>
<li><a href="#orge1acf8e">范围</a></li>
<li><a href="#orge71900f">反向操作：'!'</a></li>
</ul>
</li>
<li><a href="#org5215676">Command （Script格式的X部分）</a>
<ul>
<li><a href="#org26f2ab4">a</a></li>
<li><a href="#org27143b1">c</a></li>
<li><a href="#org873f429">d</a></li>
<li><a href="#orgb96df29">i</a></li>
<li><a href="#orgba8405d">p</a></li>
<li><a href="#org683110d">s</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="outline-2" id="outline-container-org2d23f93">
<h2 id="org2d23f93">一般用法：</h2>
<div class="outline-text-2" id="text-org2d23f93">
<p>
 sed SCRIPT INPUTFILE... 
</p>
<p>
例如替换所有的hello为world：  sed 's/hello/world/' input.txt &gt; output.txt  。
这条命令不会修改文件input.txt的内容，因此将更改后的内容重定向到output.txt中。
如果不指定INPUTFILE，或INPUTFILE是'-'，sed从stdin中读取数据。
</p>
<p>
下面几条命令是相同的：
</p>
<p>
sed 's/hello/world/' input.txt &gt; output.txt
sed 's/hello/world/' &lt; input.txt &gt; output.txt
cat input.txt | sed 's/hello/world/' - &gt; output.txt
</p>
<p>
sed将结果写到stdout。使用'-i'直接更改文件。还有'W'和's///w'命令，将修改后的结果到其他文件。
下面的命令修改文件file.txt，并且不会输入任何结果：
</p>
<p>
sed -i 's/hello/world' file.txt
</p>
<p>
使用'-p'命令输出指定的行。例如下面的命令输出第45行：
</p>
<p>
sed -n '45p' file.txt
</p>
<p>
sed将多个文件作为一个对待。下面的命令输出第一个文件的第一行和最后一个文件的最后一行。使用'-s'能够让这种行为反过来。
</p>
<p>
sed -n  '1p ; $p' one.txt two.txt three.txt
</p>
<p>
使用'-e'或'-f'时，sed将第一个非选项参数作为要执行的脚本，然后将接下来的非选项参数作为输入文件。
如果'-e'或'-f'时，所有的非选项参数都被作为输入文件。
'-e'和'-f'能够一起使用，也能出现多次。(in which case the final effective SCRIPT will be concatenation of all the individual SCRIPTs).
</p>
<p>
下面的命令是等价的：
</p>
<p>
sed 's/hello/world/' input.txt &gt; output.txt
</p>
<p>
sed -e 's/hello/world/' input.txt &gt; output.txt
sed –expression='s/hello/world/' input.txt &gt; output.txt
</p>
<p>
echo 's/hello/world/' &gt; myscript.sed
sed -f myscript.sed input.txt &gt; output.txt
sed –file=myscript.sed input.txt &gt; output.txt
</p>
</div>
</div>
<div class="outline-2" id="outline-container-orge22c914">
<h2 id="orge22c914">Snippets</h2>
<div class="outline-text-2" id="text-orge22c914">
</div>
<div class="outline-3" id="outline-container-org2e877e1">
<h3 id="org2e877e1">Find and append to end of line</h3>
<div class="outline-text-3" id="text-org2e877e1">
<div class="org-src-container">
<pre class="src src-sh">sed <span style="font-style: italic;">'/Fred Flintstone/ s/$/ ***/'</span> filename
</pre>
</div>
<p>
查找Fred Flintstone，然后在行尾追加"&lt;space&gt;***", <i>Fred Flintstone</i> 表示查找，s开始为替换，$表示行尾
</p>
</div>
</div>
</div>
<div class="outline-2" id="outline-container-orgad369d0">
<h2 id="orgad369d0">命令行选项</h2>
<div class="outline-text-2" id="text-orgad369d0">
<p>
sed OPTIONS… [SCRIPT] [INPUTFILE…]
</p>
</div>
<div class="outline-3" id="outline-container-org69209dd">
<h3 id="org69209dd">–version</h3>
</div>
<div class="outline-3" id="outline-container-orgaa27efc">
<h3 id="orgaa27efc">–help</h3>
</div>
</div>
<div class="outline-2" id="outline-container-org23be860">
<h2 id="org23be860">SCRIPT</h2>
<div class="outline-text-2" id="text-org23be860">
<p>
'sed' 脚本的格式如下：
</p>
<p>
 [addr]X[options] 
</p>
<p>
其中，addr optional，表示行地址，能够使用数字、正则、范围表示；X是单个字符，表示command；options是command需要的。
例如  sed '30,35d' input.txt &gt; output.txt  删除30到35行：
</p>
</div>
<div class="outline-3" id="outline-container-org64d41b0">
<h3 id="org64d41b0">Address （Script格式的[addr]部分）</h3>
<div class="outline-text-3" id="text-org64d41b0">
<p>
Address用于指定在哪些行sed，行是从1开始的。
如果没有指定addr，则应用于所有的行。
</p>
</div>
<div class="outline-4" id="outline-container-orga36d0f1">
<h4 id="orga36d0f1">数字</h4>
<div class="outline-text-4" id="text-orga36d0f1">
<p>
例如：  sed '144s/hello/world/' input.txt &gt; output.txt  在第144行上执行查找替换操作。
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orge97a544">
<h4 id="orge97a544">正则</h4>
<div class="outline-text-4" id="text-orge97a544">
<p>
例如：  sed '/apple/s/hello/world' input.txt &gt; output.txt  在包含apple的行上执行后面的 s/hello/world 操作。
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orge1acf8e">
<h4 id="orge1acf8e">范围</h4>
<div class="outline-text-4" id="text-orge1acf8e">
<p>
使用','分隔两个addr，两个addr能够是数字，也能是正则，甚至是混合的。
例如：  sed '4,17s/hello/world' input.txt &gt; output.txt  在4到17行（包含17行）上执行后面的 s/hello/world 操作。
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orge71900f">
<h4 id="orge71900f">反向操作：'!'</h4>
<div class="outline-text-4" id="text-orge71900f">
<p>
addr部分，X部分前面，加上'!'符号，对addr取反。
例如：  sed '/apple/!s/hello/world/' input.txt &gt; output.txt  在 <b>不</b> 包含apple的行上执行后面的 s/hello/world 操作。
例如：  sed '4,17!s/hello/world/' input.txt &gt; output.txt  仅在1~3和18到结尾的行上执行后面的 s/hello/world 操作。
</p>
</div>
</div>
</div>
<div class="outline-3" id="outline-container-org5215676">
<h3 id="org5215676">Command （Script格式的X部分）</h3>
<div class="outline-text-3" id="text-org5215676">
<p>
下面是sed支持的命令，一些是POSIX标准，还有些是GNU扩展的。
</p>
</div>
<div class="outline-4" id="outline-container-org26f2ab4">
<h4 id="org26f2ab4">a</h4>
<div class="outline-text-4" id="text-org26f2ab4">
<p>
追加行。例如：
</p>
<pre class="example">
$ echo "old
old
old
old" | sed '1a new_line'
# OUTPUT
old
new_line
old
old
old

$ echo "old
old
old
old" | sed '1,2a new_line'
# OUTPUT 1到2行，每一行的后面都追加了新行
old
new_line
old
new_line
old
old
</pre>
</div>
</div>
<div class="outline-4" id="outline-container-org27143b1">
<h4 id="org27143b1">c</h4>
<div class="outline-text-4" id="text-org27143b1">
<p>
替换行，例如：
</p>
<pre class="example">
$ echo "old
old
old
old" | sed '1,2c new_line'
# OUTPUT sed指定了两行，两行被替换成了new_line，是的，结果是相比原来少了一行，而 *不是分别* 将1和2行替换成new_line
new_line
old
old
</pre>
</div>
</div>
<div class="outline-4" id="outline-container-org873f429">
<h4 id="org873f429">d</h4>
<div class="outline-text-4" id="text-org873f429">
<p>
删除行，例如  sed '3d' input.txt 
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgb96df29">
<h4 id="orgb96df29">i</h4>
<div class="outline-text-4" id="text-orgb96df29">
<p>
插入。在指定行之前插入新的行。'a'是在指定行之后，'i'是在指定行前。
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgba8405d">
<h4 id="orgba8405d">p</h4>
<div class="outline-text-4" id="text-orgba8405d">
<p>
打印，结合addr使用，能够实现查询（由于addr支持正则）
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org683110d">
<h4 id="org683110d">s</h4>
<div class="outline-text-4" id="text-org683110d">
<p>
查找替换，它的语法是  s/REGEXP/REPLACEMENT/FLAGS  。查找匹配REGEXP（正则）的部分，然后替换为REPLACEMENT。类似vim中的。
</p>
<p>
FLAGS部分：
</p>
</div>
<ul class="org-ul">
<li><a id="org8818f55"></a>g<br>
<div class="outline-text-5" id="text-org8818f55">
<p>
替换所有匹配，例如：  sed 's/old/new/g' 
</p>
</div>
</li>
<li><a id="orgfa4cf28"></a>NUMBER<br>
<div class="outline-text-5" id="text-orgfa4cf28">
<p>
FLAGS是一个数字，表示查找替换的次数。
例如：  sed 's/old/new/3' 
</p>
<p>
POSIX标准没有规定g和NUMBER一同使用应该怎样，在GNU的sed中是：忽略NUMBER次这前的，然后到结尾，NUMBER相当于起点。
例如  sed 's/old/new/g3'  。下面是 <a href="https://unix.stackexchange.com/questions/155805/sed-replace-first-k-instances-of-a-word-in-the-file" target="_blank" rel="noopener">SO</a> 上的例子，只替换前几个匹配的：
</p>
<pre class="example">
$ echo old old old old old | sed -E 's/\&lt;old\&gt;/\n/g4; s/\&lt;old\&gt;/new/g; s/\n/old/g'
# OUTPUT
# new new new old old
# 由于g和NUMBER是忽略，所以上面的脚本做了：
# 1. s/old/\n/g4 忽略4个匹配以前的， =&gt; old old old \n \n
# 2. s/old/new/g old替换为new =&gt; new new new \n \n
# 3. s/\n/old/g \n换回old =&gt; new new new old old
</pre>
</div>
</li>
<li><a id="orgbb11bfe"></a>w FILENAME<br>
<div class="outline-text-5" id="text-orgbb11bfe">
<p>
将结果写入指定的文件。GNU扩展了两FILENAME：stdout stderr
</p>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="status" id="postamble">
<p class="author">Author: gdme1320</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer" target="_blank" rel="noopener">Validate</a></p>
</div>

      
    </div>

    
      

    

    <footer class="article-footer">
      <a data-url="http://gdme1320.gitee.com/linux/sed/" data-id="cl13eo7jw008bhjv45gebpwrm" class="article-share-link">
        <i class="fa fa-share"></i> Share
      </a>
      
      

    </footer>
  </div>
  
    
<ul id="article-nav" class="nav nav-pills nav-justified">
  
  <li role="presentation">
    <a href="/linux/vsftpd/" id="article-nav-older" class="article-nav-link-wrap">
      <i class="fa fa-chevron-left pull-left"></i>
      <span class="article-nav-link-title">VSftpd笔记</span>
    </a>
  </li>
  
  
  <li role="presentation">
    <a href="/linux/mount/" id="article-nav-newer" class="article-nav-link-wrap">
      <span class="article-nav-link-title">‎</span>
      <i class="fa fa-chevron-right pull-right"></i>
    </a>
  </li>
  
</ul>


  
</article>




        </div>
        <div class="col-sm-3 col-sm-offset-1 blog-sidebar">
          
  
  <div class="sidebar-module">
    <h4>Categories</h4>
    <ul class="sidebar-module-list"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/apps/">apps</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/architecture/">architecture</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/devops/">devops</a><span class="sidebar-module-list-count">10</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/devops/kubectl/">kubectl</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/devops/kubernetes/">kubernetes</a><span class="sidebar-module-list-count">3</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/dotnet/">dotnet</a><span class="sidebar-module-list-count">3</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/dotnet/entityframework/">entityframework</a><span class="sidebar-module-list-count">1</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/elasticsearch/">elasticsearch</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/emacs/">emacs</a><span class="sidebar-module-list-count">4</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/emacs/org-mode/">org-mode</a><span class="sidebar-module-list-count">3</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/git/">git</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/graphql/">graphql</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/groovy/">groovy</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/">java</a><span class="sidebar-module-list-count">52</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/concurrent/">concurrent</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/jackson/">jackson</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/shiro/">shiro</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/spring/">spring</a><span class="sidebar-module-list-count">11</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/spring-amqp/">spring-amqp</a><span class="sidebar-module-list-count">5</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/spring-amqp/spring-jpa/">spring-jpa</a><span class="sidebar-module-list-count">1</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/spring-jpa/">spring-jpa</a><span class="sidebar-module-list-count">10</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/spring-security/">spring-security</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/thymeleaf/">thymeleaf</a><span class="sidebar-module-list-count">2</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/java/thymeleaf/maven/">maven</a><span class="sidebar-module-list-count">1</span></li></ul></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/jenkins/">jenkins</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/journal/">journal</a><span class="sidebar-module-list-count">7</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/js/">js</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/">linux</a><span class="sidebar-module-list-count">35</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/kde/">kde</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/kross/">kross</a><span class="sidebar-module-list-count">3</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/kross/ktorrent-scripts/">ktorrent-scripts</a><span class="sidebar-module-list-count">1</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/shell/">shell</a><span class="sidebar-module-list-count">6</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/linux/tcp/">tcp</a><span class="sidebar-module-list-count">1</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/lisp/">lisp</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/mongodb/">mongodb</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/mssql/">mssql</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/mysql/">mysql</a><span class="sidebar-module-list-count">12</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/nginx/">nginx</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/node/">node</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/postgresql/">postgresql</a><span class="sidebar-module-list-count">2</span><ul class="sidebar-module-list-child"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/postgresql/client/">client</a><span class="sidebar-module-list-count">1</span></li></ul></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/python/">python</a><span class="sidebar-module-list-count">19</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/regex/">regex</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/rfc/">rfc</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/vim/">vim</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/categories/windows/">windows</a><span class="sidebar-module-list-count">7</span></li></ul>
  </div>



  
  <div class="sidebar-module">
    <h4>Tags</h4>
    <ul class="sidebar-module-list"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/ReentrantLock/">ReentrantLock</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/nohup/">nohup</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/tags/pandoc/">pandoc</a><span class="sidebar-module-list-count">1</span></li></ul>
  </div>



  
  <div class="sidebar-module">
    <h4>Tag Cloud</h4>
    <p class="tagcloud">
      <a href="/tags/ReentrantLock/" style="font-size: 10px;">ReentrantLock</a> <a href="/tags/nohup/" style="font-size: 10px;">nohup</a> <a href="/tags/pandoc/" style="font-size: 10px;">pandoc</a>
    </p>
  </div>


  
  <div class="sidebar-module">
    <h4>Archives</h4>
    <ul class="sidebar-module-list"><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2919/06/">June 2919</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2022/03/">March 2022</a><span class="sidebar-module-list-count">58</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2022/01/">January 2022</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/11/">November 2021</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/10/">October 2021</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/04/">April 2021</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/03/">March 2021</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/02/">February 2021</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2021/01/">January 2021</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/12/">December 2020</a><span class="sidebar-module-list-count">2</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/11/">November 2020</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/10/">October 2020</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/09/">September 2020</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/07/">July 2020</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/06/">June 2020</a><span class="sidebar-module-list-count">10</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/04/">April 2020</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/03/">March 2020</a><span class="sidebar-module-list-count">8</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/02/">February 2020</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2020/01/">January 2020</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/12/">December 2019</a><span class="sidebar-module-list-count">7</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/11/">November 2019</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/10/">October 2019</a><span class="sidebar-module-list-count">11</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/09/">September 2019</a><span class="sidebar-module-list-count">6</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/08/">August 2019</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/07/">July 2019</a><span class="sidebar-module-list-count">10</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/06/">June 2019</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/05/">May 2019</a><span class="sidebar-module-list-count">3</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/04/">April 2019</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/03/">March 2019</a><span class="sidebar-module-list-count">8</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/02/">February 2019</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2019/01/">January 2019</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/11/">November 2018</a><span class="sidebar-module-list-count">4</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/10/">October 2018</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/08/">August 2018</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/07/">July 2018</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/06/">June 2018</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2018/03/">March 2018</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2017/07/">July 2017</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2017/06/">June 2017</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2017/04/">April 2017</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/2015/05/">May 2015</a><span class="sidebar-module-list-count">1</span></li><li class="sidebar-module-list-item"><a class="sidebar-module-list-link" href="/archives/1970/01/">January 1970</a><span class="sidebar-module-list-count">9</span></li></ul>
  </div>



  
  <div class="sidebar-module">
    <h4>Recents</h4>
    <ul class="sidebar-module-list">
      
        <li>
          <a href="/java/acessing-generic-types-at-runtime/">获取泛型类型</a>
        </li>
      
        <li>
          <a href="/linux/shell/bash_cgi/">Script for Shell Parsing Parameters</a>
        </li>
      
        <li>
          <a href="/linux/shell/shell-script/">Shell Script Getting Start</a>
        </li>
      
        <li>
          <a href="/linux/tcp/network-tcp-performance-turning-with-sysctl/">【翻译】Sysctl调节Linux网络性能</a>
        </li>
      
        <li>
          <a href="/java/concurrent/aqs-src/">AQS源码笔记</a>
        </li>
      
    </ul>
  </div>



        </div>
    </div>
  </div>
  <footer class="blog-footer">
  <div class="container">
    <div id="footer-info" class="inner">
      &copy; 2022 gdme1320<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

  

<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" integrity="sha384-8gBf6Y4YYq7Jx97PIqmTwLPin4hxIzQw5aDmUg/DDhul9fFpbbLcLh3nTIIDJKhx" crossorigin="anonymous"></script> -->

<script src="/js/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>



<script src="/js/script.js"></script>

</body>
</html>
